<template>
  <div id="admin_jsgl">
    <div class="while">
      <el-tabs @tab-click="tabclick" v-model="activeName">
        <el-tab-pane label="待审核" name='1'>
          <!-- <table1 :parent="this" ref="table1"></table1> -->
        </el-tab-pane>
        <el-tab-pane label="报名中" name="2">
          <!-- <table1 :parent="this" ref="table1"></table1> -->
        </el-tab-pane>
        <el-tab-pane label="审核失败" name="3">
          <!-- <table1 :parent="this" ref="table1"></table1> -->
        </el-tab-pane>
        <el-tab-pane label="待举办" name="4">
          <!-- <table1 :parent="this" ref="table1"></table1> -->
        </el-tab-pane>
        <el-tab-pane label="进行中" name="5">
          <!-- <table1 :parent="this" ref="table1"></table1> -->
        </el-tab-pane>
        <el-tab-pane label="已结束" name="6">
          <!-- <table1 :parent="this" ref="table1"></table1> -->
        </el-tab-pane>
      </el-tabs>

      <table1 :parent="this" ref="table1"></table1>
      <!-- 页码 -->
      <yema :parent="this"></yema>
    </div>


  </div>
</template>

<script>
  import table1 from "../table/table_hdgl.vue"
  // import update1 from "../update/update_hdgl.vue"
  export default {
    name: "hdgl",
    components: {
      table1,
      // update1,
    },
    data() {
      return {
        pageNum: 1,
        pageSize: 11,
        total: 0,
        data: [],
        activeName: '1'
      }
    },
    methods: {
      //修改head顶部的信息
      getHeadTitle(){
        this.$store.state.headTitle_2 = this.$t("lang._active_management");;
        this.$store.state.headicon = "el-icon-s-promotion";
        this.$store.state.headTitle = this.$t("lang._active_management");
        this.$store.state.show = true;
      },
      tabclick(tab) {
        // this.$refs.table1.checkStatus = this.activeName;
        // console.log(this.$refs.table1.checkStatus)
        this.$refs.table1.getData();
      },
      // 获取表格数据
      getData() {
        this.$axios.request({
          url: this.API + "/activity/activity/list",
          params: {
            pageSize: this.pageSize,
            pageNum: this.pageNum
          },
          method: "get"
        }).then((res) => {
          // console.log(res)
          this.pageNum = res.data.pageNum;
          this.total = res.data.total;
          this.data = res.data.rows;
        })
      },
    },
    mounted() {
      this.getHeadTitle();
      // this.getData();
    }
  }
</script>

<style>
  #admin_jsgl {
    height: 100%;
    background: #eaeff7;
  }

  .while {
    background-color: #FFFFFF;
    margin: 20px;
    border-radius: 5px;
    padding: 15px;
  }

  .while:hover {
    box-shadow: -5px -5px 10px #b5b5c5;
  }
</style>
